<?php
// +----------------------------------------------------------------------
// | 07FLYSAAS [基于ThinkPHP5.0开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2025-2035 http://www.07fly.xyz
// +----------------------------------------------------------------------
// | Professional because of focus  Persevering because of happiness
// +----------------------------------------------------------------------
// | Author: 开发人生 <goodkfrs@qq.com>
// +----------------------------------------------------------------------
/**
 * 表结构基本信息
 */
/**table_name 数据库表名（不带前缀）
 * type 类型
 * length 类型长度
 * unsigned 是否无符号
 * autoincrement 是否自动增长
 * required  是否必填
 * default  默认值
 * comment  注释
 */
return [
    'tables' => [
        'ten_tenant' => [
            'table_name' => 'ten_tenant',
            'comment' => '[saas]租户列表',
            'engine' => 'InnoDB',
            'charset' => 'utf8mb4',
            'collate' => 'utf8mb4_general_ci',
            'columns' => [
                'id' => ['type' => 'int', 'length' => 16, 'unsigned' => false, 'autoincrement' => true, 'comment' => '主id',],
                'system_default_url' => ['type' => 'varchar', 'length' => 502, 'required' => true, 'default' => '', 'comment' => '默认地址'],
                'address' => ['type' => 'varchar', 'length' => 502, 'required' => true, 'default' => '', 'comment' => '联系地址'],
                'fax' => ['type' => 'varchar', 'length' => 502, 'required' => true, 'default' => '', 'comment' => '传真'],
            ],
            'primary' => ['id'],
            'index' => [],
        ],
        'ten_tenant_type' => [
            'table_name' => 'ten_tenant_type',
            'comment' => '[saas]租户类型表',
            'engine' => 'InnoDB',
            'charset' => 'utf8mb4',
            'collate' => 'utf8mb4_general_ci',
            'columns' => [
                'id' => ['type' => 'int', 'length' => 16, 'unsigned' => false, 'autoincrement' => true, 'comment' => '主id',],
                'visiable' => ['type' => 'int', 'length' => 2, 'required' => true, 'default' => '1', 'comment' => '是否启用'],
            ],
            'primary' => ['id'],
            'index' => [],
        ],
        'ten_user' => [
            'table_name' => 'ten_user',
            'comment' => '[saas]用户列表',
            'engine' => 'InnoDB',
            'charset' => 'utf8mb4',
            'collate' => 'utf8mb4_general_ci',
            'columns' => [
                'id' => ['type' => 'int', 'length' => 16, 'unsigned' => false, 'autoincrement' => true, 'comment' => '主id',],
                'init_tenant_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', 'comment' => '批定租户跳转'],
            ],
            'primary' => ['id'],
            'index' => [],
        ],
    ]//end tables

];